Integrand size = 40, antiderivative size = 179 \[ \int \cos ^5(c+d x) (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {1}{8} \left (3 a^3 B+12 a b^2 B+12 a^2 b C+8 b^3 C\right ) x+\frac {\left (6 a^2 b B+3 b^3 B+2 a^3 C+9 a b^2 C\right ) \sin (c+d x)}{3 d}+\frac {a \left (3 a^2 B+10 b^2 B+12 a b C\right ) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a^2 (3 b B+2 a C) \cos ^2(c+d x) \sin (c+d x)}{6 d}+\frac {a B \cos ^3(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{4 d} \]
[Out]
Time = 0.57 (sec) , antiderivative size = 179, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.175, Rules used = {4157, 4110, 4159, 4132, 2717, 4130, 8} \[ \int \cos ^5(c+d x) (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {a \left (3 a^2 B+12 a b C+10 b^2 B\right ) \sin (c+d x) \cos (c+d x)}{8 d}+\frac {a^2 (2 a C+3 b B) \sin (c+d x) \cos ^2(c+d x)}{6 d}+\frac {\left (2 a^3 C+6 a^2 b B+9 a b^2 C+3 b^3 B\right ) \sin (c+d x)}{3 d}+\frac {1}{8} x \left (3 a^3 B+12 a^2 b C+12 a b^2 B+8 b^3 C\right )+\frac {a B \sin (c+d x) \cos ^3(c+d x) (a+b \sec (c+d x))^2}{4 d} \]
[In]
[Out]
Rule 8
Rule 2717
Rule 4110
Rule 4130
Rule 4132
Rule 4157
Rule 4159
Rubi steps \begin{align*} \text {integral}& = \int \cos ^4(c+d x) (a+b \sec (c+d x))^3 (B+C \sec (c+d x)) \, dx \\ & = \frac {a B \cos ^3(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{4 d}-\frac {1}{4} \int \cos ^3(c+d x) (a+b \sec (c+d x)) \left (-2 a (3 b B+2 a C)-\left (3 a^2 B+4 b^2 B+8 a b C\right ) \sec (c+d x)-b (a B+4 b C) \sec ^2(c+d x)\right ) \, dx \\ & = \frac {a^2 (3 b B+2 a C) \cos ^2(c+d x) \sin (c+d x)}{6 d}+\frac {a B \cos ^3(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{4 d}+\frac {1}{12} \int \cos ^2(c+d x) \left (3 a \left (3 a^2 B+10 b^2 B+12 a b C\right )+4 \left (6 a^2 b B+3 b^3 B+2 a^3 C+9 a b^2 C\right ) \sec (c+d x)+3 b^2 (a B+4 b C) \sec ^2(c+d x)\right ) \, dx \\ & = \frac {a^2 (3 b B+2 a C) \cos ^2(c+d x) \sin (c+d x)}{6 d}+\frac {a B \cos ^3(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{4 d}+\frac {1}{12} \int \cos ^2(c+d x) \left (3 a \left (3 a^2 B+10 b^2 B+12 a b C\right )+3 b^2 (a B+4 b C) \sec ^2(c+d x)\right ) \, dx+\frac {1}{3} \left (6 a^2 b B+3 b^3 B+2 a^3 C+9 a b^2 C\right ) \int \cos (c+d x) \, dx \\ & = \frac {\left (6 a^2 b B+3 b^3 B+2 a^3 C+9 a b^2 C\right ) \sin (c+d x)}{3 d}+\frac {a \left (3 a^2 B+10 b^2 B+12 a b C\right ) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a^2 (3 b B+2 a C) \cos ^2(c+d x) \sin (c+d x)}{6 d}+\frac {a B \cos ^3(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{4 d}+\frac {1}{8} \left (3 a^3 B+12 a b^2 B+12 a^2 b C+8 b^3 C\right ) \int 1 \, dx \\ & = \frac {1}{8} \left (3 a^3 B+12 a b^2 B+12 a^2 b C+8 b^3 C\right ) x+\frac {\left (6 a^2 b B+3 b^3 B+2 a^3 C+9 a b^2 C\right ) \sin (c+d x)}{3 d}+\frac {a \left (3 a^2 B+10 b^2 B+12 a b C\right ) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a^2 (3 b B+2 a C) \cos ^2(c+d x) \sin (c+d x)}{6 d}+\frac {a B \cos ^3(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{4 d} \\ \end{align*}
Time = 1.37 (sec) , antiderivative size = 140, normalized size of antiderivative = 0.78 \[ \int \cos ^5(c+d x) (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {12 \left (3 a^3 B+12 a b^2 B+12 a^2 b C+8 b^3 C\right ) (c+d x)+24 \left (9 a^2 b B+4 b^3 B+3 a^3 C+12 a b^2 C\right ) \sin (c+d x)+24 a \left (a^2 B+3 b^2 B+3 a b C\right ) \sin (2 (c+d x))+8 a^2 (3 b B+a C) \sin (3 (c+d x))+3 a^3 B \sin (4 (c+d x))}{96 d} \]
[In]
[Out]
Time = 0.54 (sec) , antiderivative size = 139, normalized size of antiderivative = 0.78
method | result | size |
parallelrisch | \(\frac {24 a \left (B \,a^{2}+3 B \,b^{2}+3 C a b \right ) \sin \left (2 d x +2 c \right )+\left (24 B \,a^{2} b +8 a^{3} C \right ) \sin \left (3 d x +3 c \right )+3 B \,a^{3} \sin \left (4 d x +4 c \right )+\left (216 B \,a^{2} b +96 B \,b^{3}+72 a^{3} C +288 C a \,b^{2}\right ) \sin \left (d x +c \right )+36 x d \left (B \,a^{3}+4 B a \,b^{2}+4 a^{2} b C +\frac {8}{3} C \,b^{3}\right )}{96 d}\) | \(139\) |
derivativedivides | \(\frac {B \,a^{3} \left (\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+B \,a^{2} b \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )+\frac {a^{3} C \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+3 B a \,b^{2} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+3 a^{2} b C \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+B \,b^{3} \sin \left (d x +c \right )+3 C a \,b^{2} \sin \left (d x +c \right )+C \,b^{3} \left (d x +c \right )}{d}\) | \(180\) |
default | \(\frac {B \,a^{3} \left (\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+B \,a^{2} b \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )+\frac {a^{3} C \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+3 B a \,b^{2} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+3 a^{2} b C \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+B \,b^{3} \sin \left (d x +c \right )+3 C a \,b^{2} \sin \left (d x +c \right )+C \,b^{3} \left (d x +c \right )}{d}\) | \(180\) |
risch | \(\frac {3 a^{3} B x}{8}+\frac {3 B a \,b^{2} x}{2}+\frac {3 C \,a^{2} b x}{2}+x C \,b^{3}+\frac {9 \sin \left (d x +c \right ) B \,a^{2} b}{4 d}+\frac {\sin \left (d x +c \right ) B \,b^{3}}{d}+\frac {3 a^{3} C \sin \left (d x +c \right )}{4 d}+\frac {3 \sin \left (d x +c \right ) C a \,b^{2}}{d}+\frac {B \,a^{3} \sin \left (4 d x +4 c \right )}{32 d}+\frac {\sin \left (3 d x +3 c \right ) B \,a^{2} b}{4 d}+\frac {\sin \left (3 d x +3 c \right ) a^{3} C}{12 d}+\frac {\sin \left (2 d x +2 c \right ) B \,a^{3}}{4 d}+\frac {3 \sin \left (2 d x +2 c \right ) B a \,b^{2}}{4 d}+\frac {3 \sin \left (2 d x +2 c \right ) a^{2} b C}{4 d}\) | \(203\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 136, normalized size of antiderivative = 0.76 \[ \int \cos ^5(c+d x) (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \, {\left (3 \, B a^{3} + 12 \, C a^{2} b + 12 \, B a b^{2} + 8 \, C b^{3}\right )} d x + {\left (6 \, B a^{3} \cos \left (d x + c\right )^{3} + 16 \, C a^{3} + 48 \, B a^{2} b + 72 \, C a b^{2} + 24 \, B b^{3} + 8 \, {\left (C a^{3} + 3 \, B a^{2} b\right )} \cos \left (d x + c\right )^{2} + 9 \, {\left (B a^{3} + 4 \, C a^{2} b + 4 \, B a b^{2}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{24 \, d} \]
[In]
[Out]
Timed out. \[ \int \cos ^5(c+d x) (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\text {Timed out} \]
[In]
[Out]
none
Time = 0.24 (sec) , antiderivative size = 171, normalized size of antiderivative = 0.96 \[ \int \cos ^5(c+d x) (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{3} - 32 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} C a^{3} - 96 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B a^{2} b + 72 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C a^{2} b + 72 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a b^{2} + 96 \, {\left (d x + c\right )} C b^{3} + 288 \, C a b^{2} \sin \left (d x + c\right ) + 96 \, B b^{3} \sin \left (d x + c\right )}{96 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 536 vs. \(2 (169) = 338\).
Time = 0.33 (sec) , antiderivative size = 536, normalized size of antiderivative = 2.99 \[ \int \cos ^5(c+d x) (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \, {\left (3 \, B a^{3} + 12 \, C a^{2} b + 12 \, B a b^{2} + 8 \, C b^{3}\right )} {\left (d x + c\right )} - \frac {2 \, {\left (15 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 24 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 72 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 36 \, C a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 36 \, B a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 72 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 24 \, B b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 9 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 40 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 120 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 36 \, C a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 36 \, B a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 216 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 72 \, B b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 9 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 40 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 120 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 36 \, C a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 36 \, B a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 216 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 72 \, B b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 24 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 72 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 36 \, C a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 36 \, B a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 72 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 24 \, B b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4}}}{24 \, d} \]
[In]
[Out]
Time = 17.14 (sec) , antiderivative size = 202, normalized size of antiderivative = 1.13 \[ \int \cos ^5(c+d x) (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3\,B\,a^3\,x}{8}+C\,b^3\,x+\frac {3\,B\,a\,b^2\,x}{2}+\frac {3\,C\,a^2\,b\,x}{2}+\frac {B\,b^3\,\sin \left (c+d\,x\right )}{d}+\frac {3\,C\,a^3\,\sin \left (c+d\,x\right )}{4\,d}+\frac {B\,a^3\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {B\,a^3\,\sin \left (4\,c+4\,d\,x\right )}{32\,d}+\frac {C\,a^3\,\sin \left (3\,c+3\,d\,x\right )}{12\,d}+\frac {3\,B\,a\,b^2\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {B\,a^2\,b\,\sin \left (3\,c+3\,d\,x\right )}{4\,d}+\frac {3\,C\,a^2\,b\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {9\,B\,a^2\,b\,\sin \left (c+d\,x\right )}{4\,d}+\frac {3\,C\,a\,b^2\,\sin \left (c+d\,x\right )}{d} \]
[In]
[Out]